package model;

/**
 * 商品实体类
 */
public class Product {
    private String productId;     // 商品编号
    private String name;          // 名称
    private double price;         // 售价
    private double purchasePrice; // 进价
    private int stock;            // 库存
    private String productionDate;// 生产日期
    private int shelfLife;        // 保质期(天)
    private String supplierId;    // 供应商编号
    
    // 构造方法
    public Product() {}
    
    public Product(String productId, String name, double price, double purchasePrice, int stock, 
                  String productionDate, int shelfLife, String supplierId) {
        this.productId = productId;
        this.name = name;
        this.price = price;
        this.purchasePrice = purchasePrice;
        this.stock = stock;
        this.productionDate = productionDate;
        this.shelfLife = shelfLife;
        this.supplierId = supplierId;
    }
    
    // getter和setter方法
    public String getProductId() {
        return productId;
    }
    
    public void setProductId(String productId) {
        this.productId = productId;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public double getPrice() {
        return price;
    }
    
    public void setPrice(double price) {
        this.price = price;
    }
    
    public double getPurchasePrice() {
        return purchasePrice;
    }
    
    public void setPurchasePrice(double purchasePrice) {
        this.purchasePrice = purchasePrice;
    }
    
    public int getStock() {
        return stock;
    }
    
    public void setStock(int stock) {
        this.stock = stock;
    }
    
    public String getProductionDate() {
        return productionDate;
    }
    
    public void setProductionDate(String productionDate) {
        this.productionDate = productionDate;
    }
    
    public int getShelfLife() {
        return shelfLife;
    }
    
    public void setShelfLife(int shelfLife) {
        this.shelfLife = shelfLife;
    }
    
    public String getSupplierId() {
        return supplierId;
    }
    
    public void setSupplierId(String supplierId) {
        this.supplierId = supplierId;
    }
}
    